package com.wys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wys.pojo.ShoppingCart;
import com.wys.result.R;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface ShoppingCartService extends IService<ShoppingCart> {
    /**
     * 添加购物车
     * @param shoppingCart
     * @return
     */
    public R<ShoppingCart> add(ShoppingCart shoppingCart, HttpSession session);

    /**
     * 查看购物车
     * @return
     */
    public List<ShoppingCart> getShoppingCart(HttpSession session);

    /**
     * 清空购物车
     * @return
     */
    public void deletedShoppingCart(HttpSession session);

    /**
     * 购物车中菜品数量减一
     * @return
     */
    public R<String> deletedWithOne(ShoppingCart shoppingCart,HttpSession session);
}
